home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
2410
/
2410.xpi
/
chrome
/
content
/
foxmarks-log.js
< prev
next >
Wrap
Text File
|
2010-01-28
|
798b
|
39 lines
/*
Copyright 2005-2007 Foxmarks Inc.
foxmarks-log.js: provides logging support.
*/
var Xmarks;
if(Xmarks === undefined){
Xmarks = {};
}
(function() {
Xmarks.LogWrite = function(str) {
if (Xmarks.gSettings.enableLogging) {
Components.classes["@foxcloud.com/extensions/foxmarks;1"].
getService(Components.interfaces.nsIFoxmarksService).logWrite(str);
}
}
Xmarks.LogTimer = function(str, startTime){
if(Xmarks.gSettings.getDebugOption("timing")){
var now = Date.now();
startTime = startTime || 0;
if(startTime){
Xmarks.LogWrite(str +
" - time=" + (now - startTime ) + "ms");
} else {
Xmarks.LogWrite(str + " - time=0");
}
return now;
}
return 0;
}
})();